﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Database;
public partial class admin_DanhsachLK : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        var pm = new checkLogin();
        pm.redirectToLoginPage();

    }


       

     public void LayDuLieu()
    {


        PagedDataSource pgitems = new PagedDataSource();
        DataView dv = new DataView(LinhKien.DSLK().Tables[0]);

    }




     protected void Repeater1_ItemCommand1(object source, RepeaterCommandEventArgs e)
     {
         if (Convert.ToString(e.CommandArgument) == "dk")
         {
             LinhKien lk = new LinhKien();
             int malinhkien = Convert.ToInt32(((HyperLink)e.Item.FindControl("hplMaLinhKien")).Text);
             //nv.XoaNV(manv);
             lk.XoaLK(malinhkien);
             LayDuLieu();
             Response.Redirect("DanhsachLK.aspx");
         }
         else
         {
             LayDuLieu();
         }
     }
}
